home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / C64 / M-More Monthly Disks / (c)m7.d64 / tape cataloger.c (.txt) < prev    next >
Commodore BASIC  |  2007-02-04  |  2KB  |  46 lines

  1. 10 FORI=707TO725:READA:POKEI,A:CK=CK+A:NEXT:IFCK<>2384THENPRINT"DATA ERROR"
  2. 11 IFCK<>2384THENSTOP
  3. 12 BC$=CHR$(14):SYS65517:IFPEEK(781)=40THENTYPE=64:GOTO14
  4. 13 POKE36879,8:B$="[147]":M1=36876:POKE36876+2,15:GOTO20
  5. 14 SO=54272:FORT=SOTOSO+24:POKET,0:NEXT
  6. 15 POKE53280,0:POKE53281,0:POKESO+24,15:POKESO+5,17:B$="[147]"
  7. 16 POKESO+6,250:POKESO,100:POKESO+1,160
  8. 20 DIM LOC(50),N$(50),BYTES(50):I=1:J$=CHR$(16):CR$=CHR$(13)
  9. 25 M$="TAPE CATALOG"+CR$
  10. 30 LC$=CHR$(15):PRINTB$"[159]****TAPE DIRECTORY****[146]"
  11. 40 INPUT"HARDCOPY (Y/N)";H$:IF H$="_" THENEND
  12. 50 IFH$="Y"THENINPUT"[158]PRINTER ON[146]";H$:H=1:GOSUB900:OPEN4,4,7
  13. 55 S$="ONE":PRINT"TAPE NAME:";:INPUTCN$:INPUT"SIDE 1 OR 2";S
  14. 60 INPUT"DATE:";DA$:IFS=2THENS$="TWO"
  15. 65 CN$=CN$+"/"+S$
  16. 70 PRINT"REWIND TAPE.[146]":PRINT"SET COUNTER.000[146]":PRINT"PRESS F7 KEY.[146][158]"
  17. 80 GETA$:IFA$<>CHR$(136)THEN80
  18. 100 GOSUB900:CLOSE1:IFST=-128THEN700
  19. 110 SYS 707:IFST=-128THEN700
  20. 120 B1=PEEK(829)+256*PEEK(830):B2=PEEK(831)+256*PEEK(832):BYTES(I)=B2-B1
  21. 130 IFI=1THENM$=M$+CN$+CR$+DA$:PRINT"[147]"M$
  22. 140 IFI=1THENIFH=1THENPRINT#4,BC$;M$;LC$;CR$
  23. 200 L$="":GOSUB900:GOSUB900:INPUT"[156]COUNTER#[146]:";L$:IFL$=""THEN200
  24. 210 L=VAL(L$)
  25. 220 IFI=1THENLOC(2)=L:LOC(1)=0:GOTO300
  26. 230 LOC(I+1)=L
  27. 300 FORX=0TO15:N$(I)=N$(I)+CHR$(PEEK(833+X)):NEXT
  28. 350 PRINT""LOC(I);TAB(4);""N$(I)""BYTES(I)"[157] BYTES.":GOSUB900
  29. 360 IFH=1THENGOSUB920
  30. 370 IFL$="_"THENCLOSE1:GOTO700
  31. 400 I=I+1:GOTO100
  32. 700 PRINT"I/O STATUS="ST:GOSUB900:CLOSE1:LM=I:IFN$(LM)=""THENLM=I-1
  33. 800 IFH=1THENPRINT#4:CLOSE4:H=0
  34. 810 D$="":INPUT"DISPLAY Y/N/H";D$:IFD$="N"THENEND
  35. 820 IFD$="H"THEN CLOSE4:OPEN4,4:PRINT#4,BC$;M$;LC$:H=1
  36. 830 PRINT"[147]"CN$:FOR I=1TOLM:PRINT"[158]"LOC(I);TAB(4)""N$(I)""BYTES(I)
  37. 840 IF D$="H"THENGOSUB920
  38. 845 IFI/10=INT(I/10)THENINPUT"MORE Y/N";M$:IFM$="N"THEN800
  39. 850 IFI/10=INT(I/10)THENINPUT"MORE Y/N";M$:IFM$="N"THEN810
  40. 860 NEXT:GOTO800
  41. 900 IFTYPE=64THEN910
  42. 905 POKEM1,232:FORS=1TO50:NEXT:POKEM1,0:RETURN
  43. 910 POKESO+4,17:POKESO+4,16:RETURN
  44. 920 PRINT#4,LOC(I);J$+"06";N$(I);J$+"24";BYTES(I)J$"29"+"BYTES.":RETURN
  45. 1000 DATA 169,1,170,160,0,32,186,255,169,0,32,189,255,169,1,32,213,255,96
  46.